<template>
<!-- vue组件除了使用路由跳转的方式 也可以作为一个标签 给其他组件使用-->
<!--<Menu></Menu>-->
  <div class="common-layout">
    <el-container>
      <el-header>
        <h1>XXX管理系统</h1>
      </el-header>
      <el-container>
        <el-aside width="200px">
          <el-menu
              default-active="2"
              class="el-menu-vertical-demo"
              @open="handleOpen"
              @close="handleClose"
              router
          >
            <el-menu-item index="/index">
              <el-icon><Loading /></el-icon>
              <span>首页</span>
            </el-menu-item>
            <el-sub-menu index="2">
              <template #title>
                <el-icon><location /></el-icon>
                <span>用户管理</span>
              </template>
              <el-menu-item index="/userList">用户列表</el-menu-item>
              <el-menu-item index="/userAdd">用户添加</el-menu-item>
              <el-menu-item index="/userList/uploadFile">文件上传</el-menu-item>
            </el-sub-menu>
          </el-menu>
        </el-aside>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script>
/* 导入组件*/
import Menu from "./components/Menu.vue";

export default {
  name:'App',
  /* 使用自定义组件*/
  components: {Menu}
  ,data(){
    return {

    }
  }
  ,methods:{
    handleOpen(){

    }
    ,handleClose(){

    }
  }
}
</script>
<style scoped>
.el-header h1{
  //border: 1px solid red;
  line-height: 60px;
  margin-left: 60px;
}
</style>